/*
 * InitObj.h
 *
 *  Created on: Nov 24, 2011
 *      Author: xwq
 */

#ifndef INITOBJ_H_
#define INITOBJ_H_

#include 	 <pthread.h>
#include "CCriticalSection.h"
#define MAX_PATH  255

class CLog
{
public:
	CLog(bool logLevel = false);
	~CLog();
	int WriteLog(const char *buf);
private:
	int GetModuleFilename(char* sModuleName, char* sFileName, int nSize);
	int DeleteExpiredFile(const char *strDirPath, char * strFileName);
	
	CCriticalSection m_mutex;
public:
	bool bLogLevel;
	char m_strWorkPath[MAX_PATH + 1];		//Dll本身路径
};

#endif /* INITOBJ_H_ */
